package edu.gyc.hivhr.model;

import lombok.Data;

@Data
public class ResultBean {
    private Integer status;
    private String msg;
    private Object data;

    public static ResultBean ok(String msg) {
        return new ResultBean(200, msg, null);
    }

    public static ResultBean ok(String msg,Object data) {
        return new ResultBean(200, msg, data);
    }

    public static ResultBean error(String msg) {
        return new ResultBean(500, msg, null);
    }

    public static ResultBean error(String msg,Object data) {
        return new ResultBean(500, msg, data);
    }
    public ResultBean(Integer status, String msg, Object data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }
}
